import 'dart:convert';

import 'package:star_author/generated/json/base/json_field.dart';
import 'package:star_author/generated/json/notifications_newest_info_entity.g.dart';

@JsonSerializable()
class NotificationsNewestInfoEntity {
  NotificationsNewestInfoBackflow? backflow;
  NotificationsNewestInfoWithdraw? withdraw;
  NotificationsNewestInfoEvaluation? evaluation;
  NotificationsNewestInfoOrder? order;
  @JSONField(name: "star_backflow")
  NotificationsNewestInfoStarBackflow? starBackflow;
  NotificationsNewestInfoTender? tender;
  Map? announcement;

  NotificationsNewestInfoEntity();

  factory NotificationsNewestInfoEntity.fromJson(Map<String, dynamic> json) =>
      $NotificationsNewestInfoEntityFromJson(json);

  Map<String, dynamic> toJson() => $NotificationsNewestInfoEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NotificationsNewestInfoBackflow {
  int? id;
  @JSONField(name: "notify_type")
  String? notifyType;
  @JSONField(name: "created_at")
  String? createdAt;
  String? title;
  String? message;
  NotificationsNewestInfoBackflowExtra? extra;
  String? action;
  @JSONField(name: "unread_count")
  int? unreadCount;

  NotificationsNewestInfoBackflow();

  factory NotificationsNewestInfoBackflow.fromJson(Map<String, dynamic> json) =>
      $NotificationsNewestInfoBackflowFromJson(json);

  Map<String, dynamic> toJson() => $NotificationsNewestInfoBackflowToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NotificationsNewestInfoBackflowExtra {
  @JSONField(name: "backflow_id")
  int? backflowId;
  @JSONField(name: "backflow_status")
  String? backflowStatus;
  @JSONField(name: "backflow_strategy")
  String? backflowStrategy;
  @JSONField(name: "backflow_cover")
  String? backflowCover;
  @JSONField(name: "order_id")
  dynamic orderId;
  @JSONField(name: "order_status")
  dynamic orderStatus;

  NotificationsNewestInfoBackflowExtra();

  factory NotificationsNewestInfoBackflowExtra.fromJson(
          Map<String, dynamic> json) =>
      $NotificationsNewestInfoBackflowExtraFromJson(json);

  Map<String, dynamic> toJson() =>
      $NotificationsNewestInfoBackflowExtraToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NotificationsNewestInfoWithdraw {
  int? id;
  @JSONField(name: "notify_type")
  String? notifyType;
  @JSONField(name: "created_at")
  String? createdAt;
  String? title;
  String? message;
  NotificationsNewestInfoWithdrawExtra? extra;
  String? action;
  @JSONField(name: "unread_count")
  int? unreadCount;

  NotificationsNewestInfoWithdraw();

  factory NotificationsNewestInfoWithdraw.fromJson(Map<String, dynamic> json) =>
      $NotificationsNewestInfoWithdrawFromJson(json);

  Map<String, dynamic> toJson() => $NotificationsNewestInfoWithdrawToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NotificationsNewestInfoWithdrawExtra {
  @JSONField(name: "withdraw_id")
  int? withdrawId;
  @JSONField(name: "withdraw_process")
  String? withdrawProcess;

  NotificationsNewestInfoWithdrawExtra();

  factory NotificationsNewestInfoWithdrawExtra.fromJson(
          Map<String, dynamic> json) =>
      $NotificationsNewestInfoWithdrawExtraFromJson(json);

  Map<String, dynamic> toJson() =>
      $NotificationsNewestInfoWithdrawExtraToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NotificationsNewestInfoEvaluation {
  int? id;
  @JSONField(name: "notify_type")
  String? notifyType;
  @JSONField(name: "created_at")
  String? createdAt;
  String? title;
  String? message;
  NotificationsNewestInfoEvaluationExtra? extra;
  String? action;
  @JSONField(name: "unread_count")
  int? unreadCount;

  NotificationsNewestInfoEvaluation();

  factory NotificationsNewestInfoEvaluation.fromJson(
          Map<String, dynamic> json) =>
      $NotificationsNewestInfoEvaluationFromJson(json);

  Map<String, dynamic> toJson() =>
      $NotificationsNewestInfoEvaluationToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NotificationsNewestInfoEvaluationExtra {
  @JSONField(name: "withdraw_id")
  int? withdrawId;
  @JSONField(name: "withdraw_process")
  String? withdrawProcess;

  NotificationsNewestInfoEvaluationExtra();

  factory NotificationsNewestInfoEvaluationExtra.fromJson(
          Map<String, dynamic> json) =>
      $NotificationsNewestInfoEvaluationExtraFromJson(json);

  Map<String, dynamic> toJson() =>
      $NotificationsNewestInfoEvaluationExtraToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NotificationsNewestInfoOrder {
  int? id;
  @JSONField(name: "notify_type")
  String? notifyType;
  @JSONField(name: "created_at")
  String? createdAt;
  String? title;
  String? message;
  NotificationsNewestInfoOrderExtra? extra;
  String? action;
  @JSONField(name: "unread_count")
  int? unreadCount;

  NotificationsNewestInfoOrder();

  factory NotificationsNewestInfoOrder.fromJson(Map<String, dynamic> json) =>
      $NotificationsNewestInfoOrderFromJson(json);

  Map<String, dynamic> toJson() => $NotificationsNewestInfoOrderToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NotificationsNewestInfoOrderExtra {
  @JSONField(name: "order_id")
  int? orderId;
  @JSONField(name: "order_number")
  String? orderNumber;
  @JSONField(name: "order_status")
  String? orderStatus;
  @JSONField(name: "backflow_strategy")
  String? backflowStrategy;
  @JSONField(name: "backflow_id")
  int? backflowId;
  @JSONField(name: "backflow_cover")
  String? backflowCover;

  NotificationsNewestInfoOrderExtra();

  factory NotificationsNewestInfoOrderExtra.fromJson(
          Map<String, dynamic> json) =>
      $NotificationsNewestInfoOrderExtraFromJson(json);

  Map<String, dynamic> toJson() =>
      $NotificationsNewestInfoOrderExtraToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NotificationsNewestInfoStarBackflow {
  int? id;
  @JSONField(name: "notify_type")
  String? notifyType;
  @JSONField(name: "created_at")
  String? createdAt;
  String? title;
  String? message;
  NotificationsNewestInfoStarBackflowExtra? extra;
  String? action;
  @JSONField(name: "unread_count")
  int? unreadCount;

  NotificationsNewestInfoStarBackflow();

  factory NotificationsNewestInfoStarBackflow.fromJson(
          Map<String, dynamic> json) =>
      $NotificationsNewestInfoStarBackflowFromJson(json);

  Map<String, dynamic> toJson() =>
      $NotificationsNewestInfoStarBackflowToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NotificationsNewestInfoStarBackflowExtra {
  @JSONField(name: "backflow_id")
  int? backflowId;
  @JSONField(name: "backflow_status")
  String? backflowStatus;
  @JSONField(name: "backflow_strategy")
  String? backflowStrategy;
  @JSONField(name: "backflow_cover")
  String? backflowCover;
  @JSONField(name: "order_id")
  dynamic orderId;
  @JSONField(name: "order_status")
  dynamic orderStatus;

  NotificationsNewestInfoStarBackflowExtra();

  factory NotificationsNewestInfoStarBackflowExtra.fromJson(
          Map<String, dynamic> json) =>
      $NotificationsNewestInfoStarBackflowExtraFromJson(json);

  Map<String, dynamic> toJson() =>
      $NotificationsNewestInfoStarBackflowExtraToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NotificationsNewestInfoTender {
  int? id;
  @JSONField(name: "notify_type")
  String? notifyType;
  @JSONField(name: "created_at")
  String? createdAt;
  String? title;
  String? message;
  NotificationsNewestInfoTenderExtra? extra;
  String? action;
  @JSONField(name: "unread_count")
  int? unreadCount;

  NotificationsNewestInfoTender();

  factory NotificationsNewestInfoTender.fromJson(Map<String, dynamic> json) =>
      $NotificationsNewestInfoTenderFromJson(json);

  Map<String, dynamic> toJson() => $NotificationsNewestInfoTenderToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NotificationsNewestInfoTenderExtra {
  @JSONField(name: "backflow_strategy")
  String? backflowStrategy;
  @JSONField(name: "backflow_id")
  int? backflowId;
  @JSONField(name: "backflow_klone_id")
  int? backflowKloneId;
  @JSONField(name: "need_paid")
  bool? needPaid;
  @JSONField(name: "backflow_cover")
  String? backflowCover;

  NotificationsNewestInfoTenderExtra();

  factory NotificationsNewestInfoTenderExtra.fromJson(
          Map<String, dynamic> json) =>
      $NotificationsNewestInfoTenderExtraFromJson(json);

  Map<String, dynamic> toJson() =>
      $NotificationsNewestInfoTenderExtraToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
